import { Component, Injector, ViewEncapsulation, ViewChild, ElementRef, OnInit } from '@angular/core';
import { AppComponentBase } from '@shared/common/app-component-base';
import { ComboboxItemDto, SideTaskServiceProxy, ReceiveTaskInput } from '@shared/service-proxies/service-proxies';
import { appModuleAnimation } from '@shared/animations/routerTransition';
import { Table } from 'primeng/components/table/table';
import { Paginator } from 'primeng/components/paginator/paginator';
import { LazyLoadEvent } from 'primeng/components/common/lazyloadevent';
import * as moment from 'moment';
import { finalize } from 'rxjs/operators';
import { PutIntoProductionModalComponent } from '@app/plan/maintasks/put-into-production-modal.component';
import { MenuItem } from 'primeng/api';

@Component({
  templateUrl: './workingdic.component.html',
  encapsulation: ViewEncapsulation.None,
  animations: [appModuleAnimation()]
})

export class WorkingdicComponent extends AppComponentBase implements OnInit {
  @ViewChild('dataTable') dataTable: Table;
  @ViewChild('paginator') paginator: Paginator;

  teamGroups: ComboboxItemDto[];
  en: any;
  filterText = '';
  constructor(
    injector: Injector,
    private _sideTaskServiceProxy: SideTaskServiceProxy
  ) {
    super(injector);
  }

  ngOnInit() {
    this._sideTaskServiceProxy.getComboxItemsForSearch().subscribe(result => {
      this.teamGroups = result.teamGroups;

    });
    // this.en = {
    //   firstDayOfWeek: 0,
    //   monthNames: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
    //   monthNamesShort: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
    //   dateFormat: 'yy-mm',
    //   weekHeader: 'Wk'
    // };
  }
//   getMonths(event?: LazyLoadEvent, se?: number) {
//   }
}
